package com.longlonggo.service;

import com.longlonggo.dao.base.IBaseDao;
import com.longlonggo.dao.system.ISysDictDao;
import com.longlonggo.entity.SysDictEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 字典类业务层实现类
 * 
 * @author 石马人山 me@longlonggo.com
 * @Created 2017年8月9日 上午11:09:01
 *          </p>
 * @version 100-000-000<br/>
 * @description <br/>
 */
@Service
public class SysDictService extends BaseService {
	/**
	 * 持久化层
	 */
	@Autowired
	private ISysDictDao sysDictDao;

	@Override
	protected IBaseDao getDao() {
		return sysDictDao;
	}

	@Override
	public List<SysDictEntity> queryListByCode(String parentCode) {
		Map<String, Object> map = new HashMap<>(2);
		map.put("sdSdCode", parentCode);
		return (List<SysDictEntity>) this.queryListByMap(map);
	}
}
